package org.spring.core.io;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

import org.spring.util.Assert;



public class FileSystemResource implements Resource {
	private File file;
	private String path;

	public FileSystemResource(String path) {
		Assert.notNull(path, "Path must not be null");
		this.file = new File(path);
		this.path = path;
	}

	public FileSystemResource(File file) {
		this.path = file.getPath();
		this.file = file;
	}

	public InputStream getInputStream() throws FileNotFoundException {
		return new FileInputStream(this.file);
	}

	public String getDescription() {
		// TODO Auto-generated method stub
		return null;
	}

}
